In languages such as Arabic and Hebrew, text is predominantly displayed from right to left, but certain portions of the text, such as numbers, are displayed from left to right. Some characters, such as symbols, can be displayed in either direction, depending upon the direction of the enclosing text. Such text is said to be bi-directional, since it can contain text in two different directions. Bi-directional text can present problems in computer applications such as word processors. For instance, text is ordinarily represented as a sequence of consecutive numeric codes in computer memory, but when bidirectional text is displayed on a computer screen and manipulated, counterintuitive behavior can result. This counterintuitive behavior can result because bidirectional text is often stored using a memory layout referred to as “logical order,” and presented, selected, or manipulated in this order. This technique is relatively simple to implement. However, use of the logical order can result in visual discrepancies. Software, such as word processors or text editors, highlights text that is being selected for operations such as copying. A user can select a block of text by clicking or touching a location in the text to specify one end of a selection, and dragging the other end of the selection across the desired text. The software ordinarily attempts to maintain the selection across the logical order of the text. For example, if there is a run of text going from left to right adjacent to another run going from right to left, a user can select across the left to right run, and the selection remains contiguous. However, when the selection crosses the border between the two runs, the selection splits, and the selection continues with the first letter of the right to left text going forward, and the result is that two portions of text are selected. This behavior can be a usability problem, because displaying a selection of characters that does not match the characters the user selected can cause confusion. On touch screen devices, the user makes the selection by moving a finger across the screen to position selection handles, but the selection can jump from one part of the text to another. Effects such as the selection splitting or selection boundary handles jumping from one side to the other can be disconcerting for users.